<!DOCTYPE html>
<html>
<head>
<title>创建页面</title>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="http://apps.bdimg.com/libs/jquery/1.6.4/jquery.js"></script>
<script src="http://apps.bdimg.com/libs/jquery/1.6.4/jquery.min.js"></script>
</head>
<body>
<div>
<form method='post' action='<{:U(index/listact)}>'>
  
<ul id='list'>
	
	
	<a id='addnew'  href='javascript:void(0)'>增加项目</a>
	<a id='addop'  href='javascript:void(0)'>增加操作</a>
	<input id='type' type='hidden' name='type' value=''>
	<ul id='firstul'>
	<li>
	    <label>标题页面</label>
		<input name='listtitle[]' type="text" value=''>
	</li>
	<li>
	    <label>数据配置</label>
		<input name='listdata[]' type="text" value=''>
	</li>
	<li>
	   <a onclick='del()' href='javascript:void(0)'>删除</a>
	</li>
	</ul>
	
</ul>

<input type='submit' value='保存'>
</form>



</form>
	<script>
	var type=$.url().param('type');
	$('#type').val(type);
	
	
     $('#addnew').click(
	 function(){
		
		var html='<hr><ul>';
		html +=$('#firstul').html();
		html+='</ul>';
		
		$('#list').append(html); 
	 });
	 
	 $('#addop').click(
	 function(){
		
		var html='<hr><ul>';
		html +="<li><label>标题页面</label><input name='listtitle[]' type='text' value='操作'></li>
	    hmtl +="<li><label>数据配置</label><input name='listdata[]' type='text' value='caozuo'>"
		html +='</ul>';
		
		$('#list').append(html); 
	 });
	


	 function del()
	 {
		 
		 $(this).parent().parent().remove();
	 }
	
	 
	 
	 
	 
	 
	</script>
</div>
</body>
</html>
